home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / recode.lha / recode-3.2.4 / Makefile.in < prev    next >
Makefile  |  1992-10-07  |  7KB  |  244 lines

  1. # Makefile for recode.
  2. # Copyright (C) 1991 Free Software Foundation, Inc.
  3. # Francois Pinard <pinard@iro.umontreal.ca>, 1988.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. SHELL = /bin/sh
  20.  
  21. #### Start of system configuration section. ####
  22.  
  23. srcdir = @srcdir@
  24. VPATH = @srcdir@
  25. U = @U@
  26.  
  27. # If you use gcc, you should either run the fixincludes script that
  28. # comes with it or else use gcc with the -traditional option.  Otherwise
  29. # ioctl calls will be compiled incorrectly on some systems.
  30. CC = @CC@
  31. AR = ar
  32. # Set RANLIB = echo if your system doesn't have or need ranlib.
  33. RANLIB = @RANLIB@
  34. # Use cp if you don't have install.
  35. INSTALL_DATA = @INSTALL_DATA@
  36. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  37. # GNU awk (or nawk) and Flex (2.3 or better) are required if merged.c
  38. # is to be reconstructed.
  39. AWK = @AWK@
  40. LEX = @LEX@
  41.  
  42. # Things you might add to DEFS:
  43. # -DDEFAULT_CODE=...    Quoted string giving the default or usual code.
  44. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  45. # -DUSG            If you have System V/ANSI C string and
  46. #            memory functions and headers.
  47. # -DMSDOS        If you are using Messy-DOS; implies USE_FPUTC.
  48. # -DHAVE_DUP2        If the dup2(3) call is available.
  49. # -DHAVE_PIPE        If the pipe(2) call is available.
  50. # -DHAVE_POPEN        If the popen(3) call is available.
  51. # -DUSE_FPUTC        If merged.c overflows or thrashes the C compiler.
  52. # -DXENIX        If enum's are somewhat incompatible with int's.
  53.  
  54. DEFS = @DEFS@
  55. LDEFS = @LDEFS@
  56.  
  57. CFLAGS = -g -I$(srcdir) $(DEFS) -DDEFAULT_CODE=\"@DEFAULTCODE@\"
  58. LDFLAGS = -g $(LDEFS)
  59. LIBS = @LIBS@
  60.  
  61. # Common prefix for installation directories.
  62. # NOTE: Thess directories must exist when you start installation.
  63. prefix = /usr/local
  64. exec_prefix = $(prefix)
  65. # Directory in which to put the executables.
  66. bindir = $(exec_prefix)/bin
  67. # Directory in which to put the Info documentation.
  68. infodir = $(prefix)/info
  69.  
  70. #### End of system configuration section. ####
  71.  
  72. C_STEPS = asc8asc7.c ascicdcn.c asciflat.c banglat1.c cccaebcd.c \
  73. cdcaebcd.c cdcnasci.c ebcdccca.c ebcdcdca.c ibmpicon.c \
  74. ibmplat1.c ibmpmaci.c iconibmp.c lat1bang.c lat1ibmp.c \
  75. lat1ltex.c lat1txte.c maciibmp.c
  76. C_STEPOBJS = $Uasc8asc7.o $Uascicdcn.o $Uasciflat.o $Ubanglat1.o $Ucccaebcd.o \
  77. $Ucdcaebcd.o $Ucdcnasci.o $Uebcdccca.o $Uebcdcdca.o $Uibmpicon.o \
  78. $Uibmplat1.o $Uibmpmaci.o $Uiconibmp.o $Ulat1bang.o $Ulat1ibmp.o \
  79. $Ulat1ltex.o $Ulat1txte.o $Umaciibmp.o
  80.  
  81. L_STEPS = asciltex.l ascitxte.l ltexasci.l ltexlat1.l txteasci.l txtelat1.l
  82. L_STEPOBJS = $Umerged.o
  83.  
  84. LIBSRCS = getopt.c
  85. LIBOBJS = @LIBOBJS@
  86.  
  87. HDRS = common.h steps.h
  88. SRCS = recode.c version.c $(C_STEPS) $(L_STEPS) $(LIBSRCS)
  89. OBJS = $Urecode.o $Uversion.o $(C_STEPOBJS) $(L_STEPOBJS) $(LIBOBJS)
  90.  
  91. DISTFILES = README INSTALL COPYING Buggestions ChangeLog \
  92. configure.in aclocal.m4 Makefile.in configdos.pl config.tcc ansi2knr.c \
  93. mergelex.awk recode.texi ISO-8859 texinfo.tex \
  94. $(HDRS) $(SRCS) c-boxes.el checkit \
  95. configure merged.c recode.info
  96.  
  97. MSDOS_OBJS = getopt.o
  98.  
  99. CHECKTEST = @sh $(srcdir)/checkit -v $(srcdir)/COPYING
  100.  
  101. all: recode recode.info
  102. .PHONY: all
  103.  
  104. check: recode
  105.     $(CHECKTEST) txte txte
  106.     $(CHECKTEST) txte lat1
  107.     $(CHECKTEST) txte ibmp
  108.     $(CHECKTEST) txte icon
  109.     $(CHECKTEST) txte bang
  110.     $(CHECKTEST) asci ebcd
  111.     @echo "All checks completed successfully."
  112. .PHONY: check
  113.  
  114. install: all
  115.     $(INSTALL_PROGRAM) recode $(bindir)/recode
  116.     $(INSTALL_DATA) $(srcdir)/recode.info $(infodir)/recode.info
  117. .PHONY: install
  118.  
  119. uninstall: all
  120.     rm -f $(bindir)/recode $(infodir)/recode.info
  121. .PHONY: uninstall
  122.  
  123. tags: $(SRCS)
  124.     ctags $(SRCS)
  125. .PHONY: tags
  126.  
  127. TAGS: $(SRCS)
  128.     etags $(SRCS)
  129. .PHONY: TAGS
  130.  
  131. texclean:
  132.     rm -f *.aux *.cp *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr
  133. .PHONY: texclean
  134.  
  135. mostlyclean: texclean
  136.     rm -f *~ *.o core recode
  137. .PHONY: mostlyclean
  138.  
  139. clean: mostlyclean
  140. .PHONY: clean
  141.  
  142. distclean: clean
  143.     rm -f tags TAGS Makefile config.status
  144. .PHONY: distclean
  145.  
  146. realclean: distclean
  147.     rm -f recode.info table.info merged.c
  148. .PHONY: realclean
  149.  
  150. dist: $(DISTFILES)
  151.     echo recode-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname
  152.     rm -rf `cat .fname`
  153.     mkdir `cat .fname`
  154.     ln $(DISTFILES) `cat .fname`
  155.     tar chZf `cat .fname`.tar.Z `cat .fname`
  156.     rm -rf `cat .fname` .fname
  157. .PHONY: dist
  158.  
  159. dist.dos: $(DISTFILES)
  160.     rm -rf dist.dos
  161.     rm -f recode.zoo
  162.     mkdir dist.dos
  163.     cp $(DISTFILES) dist.dos
  164.     perl configdos.pl config.tcc > dist.dos/makefile
  165.     echo "$(OBJS) $(MSDOS_OBJS)" \
  166.       | tr -s ' ' "\012" | sed 's/\.o$$/.obj/' > dist.dos/objects.lst
  167.     cd dist.dos; chmod +w *; ../recode :ibmpc *; zoo ahq ../recode *
  168.     rm -rf dist.dos
  169. .PHONY: dist.dos
  170.  
  171. Makefile: Makefile.in config.status
  172.     ./config.status
  173.  
  174. config.status: configure
  175.     ./configure --no-create
  176.  
  177. configure: configure.in
  178.     autoconf
  179.  
  180. recode.info: recode.texi
  181.     makeinfo $(srcdir)/recode.texi
  182.  
  183. recode.dvi: recode.texi
  184.     tex $(srcdir)/recode.texi
  185.  
  186. table.info: table.texi
  187.     makeinfo $(srcdir)/table.texi
  188.  
  189. recode: $(OBJS)
  190.     $(CC) $(LDFLAGS) -o recode $(OBJS) $(LIBS)
  191.  
  192. merged.c: mergelex.awk $(L_STEPS)
  193.     (cd $(srcdir); $(AWK) -f mergelex.awk $(L_STEPS)) | $(LEX) -t8 > merged.tmp
  194.     rm -f $(srcdir)/mergelex.tmp
  195.     mv merged.tmp merged.c
  196.  
  197. ansi2knr: ansi2knr.c
  198.     $(CC) $(LDFLAGS) -o ansi2knr $(CFLAGS) $<
  199. _recode.c: recode.c ansi2knr
  200.     ./ansi2knr $(srcdir)/recode.c > _recode.c
  201. _version.c: version.c ansi2knr
  202.     ./ansi2knr $(srcdir)/version.c > _version.c
  203. _asc8asc7.c: asc8asc7.c ansi2knr
  204.     ./ansi2knr $(srcdir)/asc8asc7.c > _asc8asc7.c
  205. _ascicdcn.c: ascicdcn.c ansi2knr
  206.     ./ansi2knr $(srcdir)/ascicdcn.c > _ascicdcn.c
  207. _asciflat.c: asciflat.c ansi2knr
  208.     ./ansi2knr $(srcdir)/asciflat.c > _asciflat.c
  209. _banglat1.c: banglat1.c ansi2knr
  210.     ./ansi2knr $(srcdir)/banglat1.c > _banglat1.c
  211. _cccaebcd.c: cccaebcd.c ansi2knr
  212.     ./ansi2knr $(srcdir)/cccaebcd.c > _cccaebcd.c
  213. _cdcaebcd.c: cdcaebcd.c ansi2knr
  214.     ./ansi2knr $(srcdir)/cdcaebcd.c > _cdcaebcd.c
  215. _cdcnasci.c: cdcnasci.c ansi2knr
  216.     ./ansi2knr $(srcdir)/cdcnasci.c > _cdcnasci.c
  217. _ebcdccca.c: ebcdccca.c ansi2knr
  218.     ./ansi2knr $(srcdir)/ebcdccca.c > _ebcdccca.c
  219. _ebcdcdca.c: ebcdcdca.c ansi2knr
  220.     ./ansi2knr $(srcdir)/ebcdcdca.c > _ebcdcdca.c
  221. _ibmpicon.c: ibmpicon.c ansi2knr
  222.     ./ansi2knr $(srcdir)/ibmpicon.c > _ibmpicon.c
  223. _ibmplat1.c: ibmplat1.c ansi2knr
  224.     ./ansi2knr $(srcdir)/ibmplat1.c > _ibmplat1.c
  225. _ibmpmaci.c: ibmpmaci.c ansi2knr
  226.     ./ansi2knr $(srcdir)/ibmpmaci.c > _ibmpmaci.c
  227. _iconibmp.c: iconibmp.c ansi2knr
  228.     ./ansi2knr $(srcdir)/iconibmp.c > _iconibmp.c
  229. _lat1bang.c: lat1bang.c ansi2knr
  230.     ./ansi2knr $(srcdir)/lat1bang.c > _lat1bang.c
  231. _lat1ibmp.c: lat1ibmp.c ansi2knr
  232.     ./ansi2knr $(srcdir)/lat1ibmp.c > _lat1ibmp.c
  233. _lat1ltex.c: lat1ltex.c ansi2knr
  234.     ./ansi2knr $(srcdir)/lat1ltex.c > _lat1ltex.c
  235. _lat1txte.c: lat1txte.c ansi2knr
  236.     ./ansi2knr $(srcdir)/lat1txte.c > _lat1txte.c
  237. _maciibmp.c: maciibmp.c ansi2knr
  238.     ./ansi2knr $(srcdir)/maciibmp.c > _maciibmp.c
  239. _merged.c: merged.c ansi2knr
  240.     ./ansi2knr $(srcdir)/merged.c > _merged.c
  241.  
  242. $Urecode.o: steps.h
  243. $(OBJS): common.h
  244.